{literal}{if ({/literal}{$show|default:true}{literal})}{/literal}

{$headersArray  = explode('|',$headers)}
{$contentsArray = explode('|',$contents)}

<table id="{$id}" class="table {$table_class}">
    <thead>
        <tr>
            {foreach from=$headersArray item="colName"}
            <th>{$colName}</th>
            {/foreach}
        </tr>
    </thead>
    <tbody>
        {literal}{foreach from={/literal}{$from}{literal} item="{/literal}{$item}{literal}"}{/literal}
        <tr>
            {foreach from=$contentsArray item="cellContent"}
            <td>{$cellContent}</td>
            {/foreach}
        </tr>
        {literal}{/foreach}{/literal}
    </tbody>
</table>

{literal}{/if}{/literal}
